package cn.bone.chapter08;

import java.util.ArrayList;
import java.util.List;

/**
    -Xms9m -Xmx9m -XX:+PrintGCDetails
 */
public class GCTest {

    public static void main(String... args){
        int i = 0;
        try{
            List<String> list = new ArrayList<>();
            String a = "abcdefg";
            while(true){
                list.add(a);
                a = a + a;
                i++;
            }
        }catch (Throwable t){
            t.printStackTrace();
            System.out.println("遍历次数：" + i);
        }
    }
}
